<!DOCTYPE HTML>
<html>
    <head>        
        <?php include 'views/content.php'; ?>

        <script type="text/javascript">
            $().ready(function () {
                // validate signup form on keyup and submit            
                $("#formLogin").validate({
                    rules: {
                        username: {
                            required: true,
                            minlength: 5
                        },
                        password: {
                            required: true,
                            minlength: 5
                        }
                    },
                    messages: {
                        username: {
                            required: "Por favor, ingresa el usuario",
                            minlength: "Tu usuario debe tener al menos 5 caracteres"
                        },
                        password: {
                            required: "Por favor, ingresa tu clave",
                            minlength: "Tu clave debe tener al menos 5 caracteres"
                        }
                    }
                });
            });
        </script>
    </head>
    <body>      
        <header> <img alt="" title="Alcald&iacute;a de Plaza" src="images/header.png" width="100%" height="180"/> </header>
        <div id="menu-wrapper">
            <div id="menu">
                <h1><?php echo $_SESSION['msj'] ?></h1>
                <nav id="nav"> 
                    <a href="index.php">Inicio</a> 
                    <a href="contacto.php">Contactanos</a>
                    <a href="registro.php">Registrate</a>                          
                </nav>
            </div>
        </div>
        <div id="main">
            <div class="column-left">
                <form id="formLogin" name="formLogin" method="post" action="<?php echo $_SERVER['HELPER'] ?>?action=usuario&method=autenticate">
                    <h2>Inicia Sessión</h2>
                    Usuario:&nbsp;
                    <input type="text" id="username" name="username" size="15" maxlength="15" placeholder="Usuario" />
                    <br /><br />
                    Clave:&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="password" id="password" name="password" size="15" maxlength="15" placeholder="Clave" />
                    <br/><br/>
                    <a href="clave.php">Recuperar Contrase&ntilde;a</a>
                    <br/><br/>
                    <footer class="controls"> 
                        <button type="reset" class="button" >Limpiar</button>
                        <button type="submit" class="button" >Entrar</button>
                    </footer>
                </form>
            </div>
            <div class="column-center">                        
                <h2>Bienvenido</h2>
                <ul class="small-image-list">
                    <li> <a href="#"><img src="images/index001.jpg" alt="" class="left" /></a>
                        <h4>Registro de las obras del municipio</h4>
                        <p></p>
                    </li>
                    <li> <a href="#"><img src="images/index002.jpg" alt="" class="left" /></a>
                        <h4>Evalue la realización de obras del municipio</h4>
                        <p></p>
                    </li>
                </ul>
            </div>
            <div class="column-right">                        
                <br/>
            </div>                                    
        </div>
        <?php include 'views/footer.php'; ?>      
    </body>
</html>